Relational-Database-Design-Functional-Dependency
Functional dependencies are some constraints on the set of legal relations. The constraint is that the value for a certain set of attributes uniquely determines the value for another set of attributes. 约束条件是一组属性的值唯一确定另一组属性的值 A functional dependency is a generalization of the notion of a key. 功能依赖关系是键概念的泛化
Functional Dependency Property 功能依赖
is a super key for relation schema iff is a condidate key for iff and for no Functional dependencies can express constraints that cannot be expressed using superkeys. For example:
We can use functional dependency to hold
But would not expect the following to hold:
we can use functional dependency to specify constraints on the set of legal relations
Trivial A functional dependency is trivial if it is satisfied by all instances of a relation. Equivalently, If $\beta \subseteq \alpha $, then
is trivial. Example:
Closure of a Set of Functional Dependencies 功能依赖的闭包
The set of all functional dependencies logically implied by
How to find
- Applying Armstrong's Axioms
- reflexivity
- if
then
- if
- augumentation
- if
then for any .
- if
- transitivity
- if
and , then
- if
- reflexivity
- These rules are sound and complete.
This method is also apply in Attribute Closure.
Prove Armstrong's Axioms
For Union: If $\alpha \rightarrow \beta $ and
According to augmentation According to transitivity
For Decomposition: if
according to reflexivity according to reflexivity according to transitivity
For pseudotransitivity if
according to augmentation according to transitivity